<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"> 
 
<head> 
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
	<title>湖南省自来水公司营销管理信息系统</title> 
	
	<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/text.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/form.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/buttons.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/grid.css" type="text/css" media="screen" title="no title" />	
	<link rel="stylesheet" href="../css/layout.css" type="text/css" media="screen" title="no title" />	
	
	<link rel="stylesheet" href="../css/ui-darkness/jquery-ui-1.8.12.custom.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/jquery.visualize.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/facebox.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/uniform.default.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/dataTables.css" type="text/css" media="screen" title="no title" />
	
	<link rel="stylesheet" href="../css/custom.css" type="text/css" media="screen" title="no title">
	<script src="../js/jquery/jquery-3.3.1.js"></script>
	<script src="/webjars/vue/2.5.17/dist/vue.js"></script>
	<script>
		var url =  new URLSearchParams(location.search);
		var areaname =url.get("areaname");
		var volumename=url.get("volumename");
		var volumeId=url.get("volumeId")
		$(function(){
			$("#areaname").val(areaname);
			$("#volume").val(volumename);
			$("#volumeId").val(volumeId);
		});

	</script>
	<script type="text/javascript">
		Date.prototype.Format = function (fmt) {
			var o = {
				"M+": this.getMonth() + 1, //月份
				"d+": this.getDate(), //日
				"H+": this.getHours(), //小时
				"m+": this.getMinutes(), //分
				"s+": this.getSeconds(), //秒
				"q+": Math.floor((this.getMonth() + 3) / 3), //季度
				"S": this.getMilliseconds() //毫秒
			};
			if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
			for (var k in o)
				if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
			return fmt;
		}
		$(function(){
			showtime();
		});

		function showtime(){
			var date=new Date();
			str= date.Format("yyyyMM");
			year=date.Format("yyyy");
			month=date.Format("MM")
			$("#id").val(str);
			$("#year").val(year);
			$("#month").val(month);
			//延迟执行一次
			window.setTimeout("showtime()",1000);
		}


	</script>
</head> 
 
<body> 

<div id="wrapper">



	<div id="bool"><script>window.onload=function (){  $("#bool").load("../ming.html");}</script></div>


	<div id="content" class="xgrid">
		
 		
		<div class="x12">
			
			<h2>任务分配</h2>
			
			<div class="form label-inline uniform">
				<form id="f1">
					<input name="volumeId" type="hidden" id="volumeId">
				<input name="readYear" id="year" type="hidden"><input name="readMonth" id="month" type="hidden">
				<div class="field"><label for="id">抄表年月</label> <input id="id"   size="50" type="text" class="medium" disabled="disabled"/></div>
				
				<div class="field"><label for="areaname">辖区</label> <input id="areaname"  size="50" type="text" /></div>
				
				<div class="field"><label for="volume">表册</label> <input id="volume"  size="50" type="text" class="medium"  /></div>
				
				<div class="field"><label for="name">任务分配给</label>
					<select name="empId" class="medium" id="name">
					<option value="" selected="selected">请选择</option>
						<option v-for="e in emp" :value="e.id">{{e.empNmae}}</option>
					</select>
				</div>

				<div class="buttonrow">
					<button type="button" class="btn" onclick="add()">确定</button>
					<button class="btn btn-grey" onClick="history.back(-1);">返回</button>
				</div>
				</form>
			</div>
			
		</div> <!-- .x12 -->
		
	</div> <!-- #content -->
	<script>
		function add() {
			bool=true;
			var selval=$("#name").val();
			if(selval==""){
				bool=false;
				alert("请选择抄表人");
				return false;
			}
			if(bool){
			var f1=$("#f1").serialize();
			$.post("/rd-task/addtask",f1,function(){
			alert("分配成功")
			});
			}
		}
	</script>
	<script>
		var content=new Vue({
			el:"#content",
			data:{
				emp:"",
			},
			created(){

				$.getJSON("/rd-read/queryemp",function(json){
					content.emp=json;
				})
			}
		});
	</script>
	
	<div id="footer">		
		<div class="content_pad">			
			<p>&copy; 2013-11 版权所有 <a href="#">湖南省自来水公司</a>.   技术支持 <a href="#">职业教育</a>.</p>
		</div> <!-- .content_pad -->
	</div> <!-- #footer -->
	
</div> <!-- #wrapper -->

<script src="../js/jquery/jquery-1.5.2.min.js"></script>
<script src="../js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
<script src="../js/misc/excanvas.min.js"></script>
<script src="../js/jquery/facebox.js"></script>
<script src="../js/jquery/jquery.visualize.js"></script>
<script src="../js/jquery/jquery.dataTables.min.js"></script>
<script src="../js/jquery/jquery.tablesorter.min.js"></script>
<script src="../js/jquery/jquery.uniform.min.js"></script>
<script src="../js/jquery/jquery.placeholder.min.js"></script>

<script src="../js/widgets.js"></script>
<script src="../js/dashboard.js"></script>

<script type="text/javascript">
	
$(document).ready ( function () 
{
	Dashboard.init ();		
});

</script>

</body> 
 
</html>